//
//  TopViewCell.m
//  商城
//
//  Created by runone02 on 2018/9/17.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "TopViewCell.h"

@implementation TopViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI{
   
    self.NameLabel = [[UILabel alloc] init];
    self.NameLabel.textColor = COLOR_BLACK;
    self.NameLabel.textAlignment = NSTextAlignmentCenter;
    self.NameLabel.font = TITLE_FONT(20);
    [self addSubview:self.NameLabel];
    
    [self.NameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.bottom.left.right.mas_equalTo(self);     
    }];
    
    self.imageView = [[UIImageView alloc]init];
    [self addSubview:self.imageView];
    
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.mas_equalTo(self);
        make.bottom.mas_equalTo(self.NameLabel.mas_top);
    }];
}


@end
